'use strict';

const conn = require('../../libs/DB/Conn');
const _ = require('underscore');

module.exports = async function (params) {
    let updateObj = {
        agent_name: params.agentName,
        agent_principal: params.agentPrincipal,
        phone_number: params.phoneNumber,
        company_addr: params.companyAddr
    }
    await conn(`UPDATE agent_file SET ? WHERE agent_id in (?)`, [updateObj, params.agentId]);
    return {success: true}
};